home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 February / Chip_2003-02_cd1.bin / zkuste / xptools / install / Xsetup / setup.exe / {app} / plugins / XQ IE Search 2.xpl < prev    next >
Text File  |  2002-11-04  |  5KB  |  137 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="8"
  3. "COUNT"="3"
  4. "UIPATH"="Internet\Internet Explorer\System"
  5. "NAME"="Address Bar Search"
  6. "VERSION"="1.00"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Add"
  9. "TEXT 2"="Edit"
  10. "TEXT 3"="Delete"
  11. "DESCRIPTION 1"="For Internet Explorer 6.0 and above: Internet Explorer supports a new featured called "Address Bar Search"."
  12. "DESCRIPTION 2"="You can define a keyword, e.g. "google" and enter this, plus the word it should search for into the address bar of IE. For example, you could simply enter "google Xteq" to perform a google search for "Xteq". This saves some time when you do research on the web."
  13. "DESCRIPTION 3"="This plug-in list all address bar search keywords, which you can edit, add new or delete."
  14. "DESCRIPTION 4"="After making changes, please restart Internet Explorer."
  15. "DESCRIPTION 5"="HINT: To add add new search engines here, simply do the following:"
  16. "DESCRIPTION 6"="- Go to the website of the search engine and search for a very strange word, e.g. "XoXoXoX"."
  17. "DESCRIPTION 7"="- Hit the "GO", "SEARCH" button or whatever the button is called on that site."
  18. "DESCRIPTION 8"="- When the results are displayed, copy the entire URL from the address bar of IE into the clipboard (CTRL+C)."
  19. "DESCRIPTION 9"="- Add a new entry with this plug-in and paste the URL (CTRL+V) into the second popup window."
  20. "DESCRIPTION 10"="- Before clicking on OK, change the strange word (e.g. XoXoXoX) in the URL to %s."
  21. "AUTHOR"="Xteq Systems"
  22. "CONTACTURL"="http://www.xteq.com"
  23. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  24. "COMMENT 1"="see http://www.jsiinc.com/SUBK/tip5400/rh5446.htm"
  25. "COMMENT 2"=" "
  26.  
  27.  
  28.  
  29. sPath="HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\"
  30.  
  31. dim iItems        'contains the total amount of the registry keys
  32. Dim aryItems()    'contains the name of the Registry paths (direct files starting with ".")
  33.  
  34.  
  35. Sub Plugin_Initialize 
  36.  iItems=0
  37.  
  38.  if RegPathExists(sPath) then
  39.     Call ReadRegistry
  40.  else
  41.     Call Disable
  42.  end if
  43. End Sub
  44.  
  45.  
  46. Sub ReadRegistry
  47.  for l=1 to iItems
  48.      Call SetUIElement(l,"")
  49.  next 
  50.  
  51.  iItems=RegEnumPaths(sPath) 
  52.  ReDim aryItems(iItems)
  53.  
  54.  For l=1 to iItems 
  55.      'save the name
  56.      sName=RegEnumElement(l)
  57.      aryItems(l)=sName
  58.      
  59.      sURL=RegReadValue(sPath & sName & "\@")
  60.      Call SetUIElement(l,sName & " (" & sURL & ")")
  61.  next
  62.  
  63.  
  64. End Sub
  65.  
  66.  
  67.  
  68.  
  69. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  70.  if ElementIndex=1 then 'Add
  71.     sNewName=InputWindow("Please enter the keyword for this search, e.g. 'google'","",1)
  72.     if IsEmpty(sNewName)=false then
  73.        sNewURL=InputWindow("Please enter the complete URL for this search, including http:// and the parameter %s (e.g. 'http://www.google.com/search?q=%s'","",1)
  74.        if IsEmpty(sNewURL)=false then
  75.           Call RegWriteValue(sPath & sNewName & "\@",sNewURL,1)
  76.           Call ReadRegistry()
  77.        end if
  78.     end if
  79.  
  80.  
  81.  else 
  82.     if ElementSubIndex>0 then
  83.        sName=aryItems(ElementSubIndex)
  84.        sFullPath=sPath & sName
  85.        sURL=RegReadValue(sFullPath & "\@")
  86.  
  87.        if ElementIndex=2 then 'Edit
  88.           sNewName=InputWindow("Please enter the name for this search, e.g. 'google'",sName,1)
  89.  
  90.           if IsEmpty(sNewName)=false then
  91.              if sNewName<>sName then 
  92.                 'Name change!
  93.                 Call RegDeletePath(sFullPath)
  94.                 Call RegWriteValue(sPath & sNewName & "\@",sURL,1)
  95.                 sName=sNewName  
  96.              end if
  97.              
  98.              sNewURL=InputWindow("Please enter the complete URL for this search, including http:// and the parameter %s (e.g. 'http://www.google.com/search?q=%s'",sURL,1)
  99.           
  100.              if IsEmpty(sNewURL)=false then
  101.                 if sNewURL<>sURL then
  102.                    'URL change
  103.                    Call RegWriteValue(sPath & sName & "\@", sNewURL,1)
  104.                 end if
  105.              end if
  106.  
  107.              Call ReadRegistry()                   
  108.           end if
  109.  
  110.        else 'delete 
  111.           Call RegDeletePath(sFullPath)
  112.           Call ReadRegistry()
  113.        end if
  114.  
  115.     else
  116.        Call MsgError("Please select an item")
  117.     end if
  118.  end if
  119.  
  120. '       Call GetInfo(sGUID)
  121. '    else
  122. '       if bDeac=false then
  123. '          Call MoveFolder(sPath & sGUID, sPath & "-" & sGUID)
  124. '       else
  125. '          Call MoveFolder(sPath & "-" & sGUID, sPath & sGUID)
  126. '       end if      
  127.  
  128. '       Call ReadRegistry()  
  129. '       Call MsgInformation("Changes made!") 
  130. '    end if
  131.  
  132. End Sub
  133.  
  134.  
  135. Sub Plugin_Terminate 
  136. End Sub
  137.